<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <canvas id="canvas" style="border: 1px solid red"></canvas>
    <script>
      const canvas = document.getElementById("canvas");
      const ctx = canvas.getContext("2d");

      ctx.shadowColor = "blue"; // 阴影颜色
      ctx.shadowBlur = 5; // 阴影模糊度
      ctx.shadowOffsetX = 10; // 阴影 x 轴偏移量
      ctx.shadowOffsetY = 10; // 阴影 y 轴偏移量

      ctx.fillStyle = "lightblue";
      ctx.rect(10, 10, 100, 100);
      ctx.fill();

      ctx.lineWidth = 4;
      ctx.strokeStyle = "lightblue";
      ctx.strokeRect(130, 10, 100, 100);
    </script>
  </body>
</html>
